Database Backup
The system uses a document-oriented Mongo database which is automatically installed and set up during installation. The data can be saved to a backup file during runtime.
Include the backups of the database in your existing backup concept. Files on the hard disk of a server should always be backed up on permanent data carriers (tapes, DVDs, etc.). You can also design rotating backups in a weekly and/or monthly rhythm.

When you install the Mongo DB, a Windows task (scheduled task) is created on the installation server which performs the backup of the Mongo DB. This is called Daily MongoDB Backup.
It features the following parameters by default:
- Action: <InstallationPath>\MongoDB\Data\backup\mongobackup.bat
- Run as: <User who installed IQ4docs>.
- Trigger: daily, 3:00 a.m.
The Windows task is also executed without a user login even if the settings in the Windows dialog, which are somewhat ambiguous, suggest that the task is only executed when a user is logged in.
The backup creates a file called mongodb.ziparchive.

To restore the database, there is a text file available in the directory <installation path>\MongoDB\Data\backup in which the command line to be executed can be found (this file is not directly executable for security reasons). The command line was provided with the appropriate installation paths by the installer.
To restore the database, run the line at the Windows command prompt (cmd).
“C:\<Installationpath>\MongoDB\MongoBackupRestore\MongoBackupRestore.exe" Restore "C:\KC4\MongoDB\bin" “C:\<Installationpath>\MongoDB\Data\backup\mongodb.ziparchive"
CAUTION: The existing database will be overwritten with no confirmation prompt.

You can edit the existing task in order to adapt the backup of the database file to your system landscape.

Execute the program MongoBackupRestore.exe to back up the data.
The following actions can be performed:
- Backup, creates a backup (zip-compressed archive).
- Restore, overwrites the current database with the data from a backup file with no confirmation prompt.
Both actions require the following two parameters separated by whitespaces: first the bin directory of the Mongo DB installation and, second, the path and name of the backup file (in "quotes" if there is a space in the path).
You can get help by running MongoBackupRestore.exe without parameters.

- Back up database
MongoBackupRestore.exe Backup "C:\IQ4docs\MongoDB\bin" "C:\IQ4docs\MongoDB\Data\backup\mongodb.ziparchive" - Restoring the backup
MongoBackupRestore.exe Restore "C:\IQ4docs\MongoDB\bin" "C:\IQ4docs\MongoDB\Data\backup\mongodb.ziparchive"
Backing up the IQ4docs data is of the greatest importance. It is essential that you familiarize yourself with the procedures for backing up and restoring the database.